using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[ExecuteInEditMode]
public class EveryoneLoadTiles:MonoBehaviour {

	public bool work;
	private void Update() {
		if(!work) return;
		work=false;

		Object[] list = Resources.FindObjectsOfTypeAll(typeof(TileRecorderBase));

		foreach(var _ in list){
			TileRecorderBase i = _ as TileRecorderBase;
			if(!i) continue;
			if(!i.isActiveAndEnabled) continue;
			i.LoadTiles();
		}

	}

}
